<?php
declare (strict_types = 1);

namespace app\mp\controller;
use app\common\controller\AppBase;
use think\facade\Config;
use EasyWeChat\Factory;
class MpBase extends AppBase
{
    private $app_config;
    protected $app;
    protected function initialize()
    {
        parent::initialize();
        $this->app_config = Config::get('wechat.miniprogram');
        $this->app = Factory::miniProgram($this->app_config);
    }
    /**
     * 获取配置信息
     *
     * @return array
     */
    public function get_config():array {
        return $this->app_config;
    }
}
